package com.ruoyi.web.admin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.admin.mapper.TdmErYiLiaoQiXieMapper;
import com.ruoyi.web.admin.domain.TdmErYiLiaoQiXie;
import com.ruoyi.web.admin.service.ITdmErYiLiaoQiXieService;

/**
 * 二类医疗器械Service业务层处理
 * 
 * @author ly
 * @date 2022-03-10
 */
@Service
public class TdmErYiLiaoQiXieServiceImpl implements ITdmErYiLiaoQiXieService 
{
    @Autowired
    private TdmErYiLiaoQiXieMapper tdmErYiLiaoQiXieMapper;

    /**
     * 查询二类医疗器械
     * 
     * @param id 二类医疗器械主键
     * @return 二类医疗器械
     */
    @Override
    public TdmErYiLiaoQiXie selectTdmErYiLiaoQiXieById(Long id)
    {
        return tdmErYiLiaoQiXieMapper.selectTdmErYiLiaoQiXieById(id);
    }

    /**
     * 查询二类医疗器械列表
     * 
     * @param tdmErYiLiaoQiXie 二类医疗器械
     * @return 二类医疗器械
     */
    @Override
    public List<TdmErYiLiaoQiXie> selectTdmErYiLiaoQiXieList(TdmErYiLiaoQiXie tdmErYiLiaoQiXie)
    {
        return tdmErYiLiaoQiXieMapper.selectTdmErYiLiaoQiXieList(tdmErYiLiaoQiXie);
    }

    /**
     * 新增二类医疗器械
     * 
     * @param tdmErYiLiaoQiXie 二类医疗器械
     * @return 结果
     */
    @Override
    public int insertTdmErYiLiaoQiXie(TdmErYiLiaoQiXie tdmErYiLiaoQiXie)
    {
        tdmErYiLiaoQiXie.setCreateTime(DateUtils.getNowDate());
        return tdmErYiLiaoQiXieMapper.insertTdmErYiLiaoQiXie(tdmErYiLiaoQiXie);
    }

    /**
     * 修改二类医疗器械
     * 
     * @param tdmErYiLiaoQiXie 二类医疗器械
     * @return 结果
     */
    @Override
    public int updateTdmErYiLiaoQiXie(TdmErYiLiaoQiXie tdmErYiLiaoQiXie)
    {
        tdmErYiLiaoQiXie.setUpdateTime(DateUtils.getNowDate());
        return tdmErYiLiaoQiXieMapper.updateTdmErYiLiaoQiXie(tdmErYiLiaoQiXie);
    }

    /**
     * 批量删除二类医疗器械
     * 
     * @param ids 需要删除的二类医疗器械主键
     * @return 结果
     */
    @Override
    public int deleteTdmErYiLiaoQiXieByIds(Long[] ids)
    {
        return tdmErYiLiaoQiXieMapper.deleteTdmErYiLiaoQiXieByIds(ids);
    }

    /**
     * 删除二类医疗器械信息
     * 
     * @param id 二类医疗器械主键
     * @return 结果
     */
    @Override
    public int deleteTdmErYiLiaoQiXieById(Long id)
    {
        return tdmErYiLiaoQiXieMapper.deleteTdmErYiLiaoQiXieById(id);
    }
}
